package com.jeejam.product.service;

import java.util.List;
import java.util.Map;

import com.jeejam.framework.base.service.BaseService;
import com.jeejam.product.pojo.Product;

public interface ProductService extends BaseService {

	public List<Product> findByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsByCategoryId(int rootCategoryId);
	
	public List<Product> findForNewByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsForNewByCategoryId(int rootCategoryId);
	
	public List<Product> findForHotByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsForHotByCategoryId(int rootCategoryId);
	
	public List<Product> findForRecommendByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsForRecommendByCategoryId(int rootCategoryId);
	
	public List<Product> findByBrandId(int brandId, int page, int pageSize);
	
	public List<Product> findByBrandName(String brandName, int page, int pageSize);
	
	public Product getByCode(String productCode);
	
	public List<Product> findForRecommend(int page, int pageSize);
	
	public List<Product> findForNew(int page, int pageSize);
	
	public List<Product> findForBest(int page, int pageSize);
	
	public List<Product> findForHot(int page, int pageSize);
	
	public List<Map<String, Object>> show(int userId, List<Product> products);
	
	public int countsForRecommend();
	
	public int countsForNew();
	
	public int countsForBest();
	
	public int countsForHot();
	
	public int getVotes(int id);
	
	public void updateViews(int id);
	
	public void updateVotes(int votes, int id);
	
	public List<Map<String, Object>> createExcelRecord(List<Product> products);
}
